@extends('layouts.admin')
@section('title','账号管理')

@section('content')

  <!-- Main content -->
  <section class="content">
    <div class="col-md-6" style="width: 100%">
      <!-- Horizontal Form -->
      <div class="box box-info">
        <div class="box-header with-border">

        </div>
        <!-- /.box-header -->
        <!-- form start -->
        <form class="form-horizontal style-form" method="post" action="{{route('admin.user.store')}}">
          {{ csrf_field() }}
          <div class="box-body">
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">姓名</label>

              <div class="col-sm-10">
                <input type="text"  class="form-control" id="name" name="name"  placeholder="唯一标识如admin" value="{{old('name')}}" >
                <lable class="error error_name"   style="display: inline-block;">{{$errors->first('name')}}</lable>
              </div>
            </div>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">账号</label>

              <div class="col-sm-10">
                <input type="text"  class="form-control" id="email" name="email" placeholder="邮箱" value="{{old('email')}}">
                <lable class="error error_email"   style="display: inline-block;">{{$errors->first('email')}}</lable>
              </div>
            </div>
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">密码</label>

              <div class="col-sm-10">
                <input type="password"  class="form-control"  placeholder="请输入密码" value="{{old('description')}}"  id="password" name="password" >
                <lable class="error error_password"   style="display: inline-block;">{{$errors->first('password')}}</lable>
              </div>
            </div>

            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">确认密码</label>

              <div class="col-sm-10">
                <input type="password"  class="form-control"  placeholder="再次输入密码" value="{{old('confirm_password')}}"  id="password_confirmed" name="password_confirmed" type="password">
                <lable class="error error_password_confirmed"   style="display: inline-block;">{{$errors->first('confirm_password')}}</lable>
              </div>
            </div>

            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">分配角色</label>

              <div class="col-sm-10">
                <select multiple="" class="form-control" name="role">

                  @foreach($role as $v)
                    @if($v->id!=1)
                      <option value="{{$v['id']}}">{{$v['name']}}</option>
                    @endif
                  @endforeach
                </select>
                <lable class="error error_role"   style="display: inline-block;">{{$errors->first('description')}}</lable>
              </div>

            </div>

          </div>
          <!-- /.box-body -->
          <div class="box-footer">
            <button type="button" class="btn btn-default" onClick="javascript:history.back()">返回</button>
            <button type="submit" class="btn btn-info pull-right ">提交</button>
          </div>
          <!-- /.box-footer -->
        </form>
      </div>
      <!-- /.box -->
      <!-- general form elements disabled -->

      <!-- /.box -->
    </div>
  </section>
  <!-- /.content -->



@endsection

@section('script')
  <script src="{{asset('assets/js/jquery.validate.js')}}"></script>
  <script src="{{asset('assets/js/quanxian.js')}}"></script>

@endsection